<#-- @ftlvariable name="entity" type="com.xci.edu.core.entity.EduQuestion" -->
<#-- @ftlvariable name="index" type="Integer" -->
<#-- @ftlvariable name="size" type="Integer" -->
<#include "/sys/_layout.ftl">
<#include "/foreground/pc/train/eduSimulatorExercise/questionType.ftl">
<#if entity==null >
    <div class="bs-callout bs-callout-warning" style="margin-right: 15px; margin-left: 15px;">
        <h4>暂无错误题</h4>
    </div>
<#else>
    <div class="row" style="margin-top: 15px;margin-left: 15px; margin-right: 15px; border:1px solid #cac8c9; padding:20px;">
        <p class="exercise_title">${index+1}、${entity.title}</p>
        <div>
            <ul class="exercise_answer">
                <@showOption model=entity />
            </ul>
        </div>
        <div class="row" style="margin-top: 15px;">
            <div class="col-md-6" style="padding-left: 0">
                <a class="btn btn-success exercise_btn" id="answer_no" style="width: 150px;">标准答案：${entity.answer}</a>
            </div>
            <div class="col-md-6 text-right">

            </div>
        </div>
    </div>

    <div class="row" style="margin-top: 15px; margin-left: 15px;">
        <div class="col-md-4" style="font-size: 12px; line-height: 34px; padding-left: 0">
            共：<span id="total">${size}</span> 题
        </div>
        <div class="col-md-8 text-right" style="padding-right: 30px;">
            <#if size&gt;0>
                <a class="btn btn-default clearQuestion"
                   data-url="/train/errorQuestion/clearQuestion">
                <span class="fa fa-times-circle"></span> 清空
                </a>

                <a class="btn btn-default deleteQuestion"
                   data-url="/train/errorQuestion/deleteQuestion?questionId=${entity.id}"
                sty style="margin-left: 15px;">
                <span class="fa fa-trash-o"></span> 删除
                </a>
                <a class="btn btn-default favoriteQuestion <@IsPrimaryBtn isFavorite />"
                   data-url="/train/errorQuestion/favoriteQuestion?questionId=${entity.id}&favoriteType=2"
                   data-favorite="${isFavorite}"><span class="fa fa-star"></span>
                    <span>
                        <#if isFavorite>
                            已收藏
                        <#else>
                            收藏
                        </#if>
                    </span>
                </a>
                <#if index-1&gt;-1>
                    <a class="btn btn-default navQuestion" data-url="/train/errorQuestion/getQuestion?index=${index-1}" style="margin-left: 15px;"><span class="fa fa-arrow-left"></span> 上一题</a>
                </#if>
                <#if index+1 < size>
                    <a class="btn btn-default navQuestion" data-url="/train/errorQuestion/getQuestion?index=${index+1}" style="margin-left: 15px;"><span class="fa fa-arrow-right"></span> 下一题</a>
                </#if>
            </#if>
        </div>
    </div>
</#if>